// dify应用api
import { StorageManager } from '@vben-core/shared/cache';

import { requestClient } from '#/api/request';

// const userId =
const storageManager = new StorageManager({
  prefix: '',
  storageType: 'sessionStorage',
});
const updateKnowledgeInfo = (payload: {
  datasetId: string;
  documentId: string;
}) => {
  return requestClient.post(
    `/dsc-systemMS/dsc-knowledge-info/${storageManager.getItem('userId')}`,
    payload,
  );
};

const getKnowledgeInfo = () => {
  // console.log(Session.get("userId"))
  return requestClient.get(
    `/dsc-systemMS/dsc-knowledge-info/${storageManager.getItem('userId')}`,
  );
};
export default {
  updateKnowledgeInfo,
  getKnowledgeInfo,
};
